package com.platform.modules.wallet.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.platform.common.web.service.BaseService;
import com.platform.modules.wallet.domain.WalletAccount;
import com.platform.modules.wallet.vo.AccountVo01;
import com.platform.modules.wallet.vo.AccountVo02;

import java.util.Date;
import java.util.List;

public interface WalletAccountService extends BaseService<WalletAccount> {

    boolean NEGATIVE = true;

    WalletAccount createRecord(AccountVo01 accountVo);

    /**
     * @param accountVo
     * @param negative  是否负数 true（负数）
     * @return
     */
    WalletAccount createRecord(AccountVo01 accountVo, boolean negative);

    void successRecord(Long id);

    /**
     * 查询我的账本记录
     *
     * @return
     */
    List<AccountVo02> queryByUserId(Long userId, int page);

    List<WalletAccount> queryYesterday(Long userId);

    List<WalletAccount> queryToday(Long userId);

    Integer queryYesterDaySum(Long userId);

    Integer queryTodaySum(Long userId);

    Integer querySumAll();

    Integer clearRecord(String beforeToday);

    IPage<WalletAccount> queryPage(Integer paeg, Integer size);
}
